package com.iccct.cloud.user.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.iccct.cloud.user.mapper.UserMapper;
import com.iccct.cloud.user.model.User;
import com.iccct.cloud.user.service.UserService;

import java.util.List;

/**
 *
 * @author iccct (taowutt1@gmail.com)
 * @since 2021-11-08  11:10
 */
@Service
public class UserServiceImpl implements UserService{

    @Resource
    private UserMapper userMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(User record) {
        return userMapper.insert(record);
    }

    @Override
    public int insertSelective(User record) {
        return userMapper.insertSelective(record);
    }

    @Override
    public User selectByPrimaryKey(Long id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return userMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<User> getAllUser(){
        return userMapper.queryAll();
    }

}
